package com.An.pojo;

import com.An.utils.DateUtils;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @auther AnYang
 * @date 2022/3/15 22:59
 **/

@NoArgsConstructor
@AllArgsConstructor
@Data
@TableName("stu_info")
public class Student {
	@TableId(value = "sno", type = IdType.AUTO)
	public Integer sno;
	public String sname;
	public String sex;
	public String sclass;
	public String natice;
	public Integer grade;
	public Date entrance;
	public Date graduate;
	public Integer state;

	@Override
	public String toString() {
		return "学生信息{" +
				"学号：" + sno +
				", 学生姓名：'" + sname + '\'' +
				", 学生性别：'" + sex + '\'' +
				", 学生班级：'" + sclass + '\'' +
				", 民族：'" + natice + '\'' +
				", 年级：" + grade +
				", 入学时间：" + DateUtils.DateToString(entrance, "yyyy-MM-dd") +
				", 毕业时间：" + DateUtils.DateToString(graduate, "yyyy-MM-dd") +
				", 学校状态：" + state +
				'}';
	}
}